package net.edu_soft.ec.common.util;

public class ResultVo {

    //响应码
    private int code;

    //返回消息
    private String message;

    //数据
    private Object data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public ResultVo() {
    }

    public ResultVo(int code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public static ResultVo succeed(String message, Object data){

        int code=200;
        return new ResultVo(200,message,data);

    }
    public static ResultVo failed(int code,String message, Object data){

        return new ResultVo(code,message,data);
    }


}
